package com.ws.haungjia.mapper;

import com.ws.haungjia.Bean.User;
import org.apache.ibatis.annotations.*;

import java.util.Date;
import java.util.List;

public interface QiantaiyonghuguanliMapper{
    @Select("select * from user ")
    public List<User> cha() ;

    @Delete("delete from user where userID=#{id}")
    int shan(int id);

    @Insert("insert into user(Name,pass,shouji,touxiang,zhuceshijian) values(#{name},#{pass},#{shouji},#{touxiang},#{zhuceshijian})")
    public int zengjia(@Param("name") String name, @Param("pass") String pass, @Param("shouji") int shouji, @Param("touxiang") String touxiang, @Param("zhuceshijian") Date zhuceshijian);

    @Select("select * from user where userID=#{id}")
    User huixian(int id);

    @Update("update user set Name=#{name},pass=#{pass},shouji=#{shouji},touxiang=#{touxiang} where userID=#{userID}")
    public int xiugai(User user);
}
